/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package session;

import entities.CategoryFoods;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

/**
 *
 * @author TANGQUOCTUAN
 */
@Stateless
public class CategoryFoodsFacade extends AbstractFacade<CategoryFoods> implements CategoryFoodsFacadeLocal {
    @PersistenceContext(unitName = "eProject_Tunga_Restaurant-ejbPU")
    private EntityManager em;

    protected EntityManager getEntityManager() {
        return em;
    }

    public CategoryFoodsFacade() {
        super(CategoryFoods.class);
    }


     public List getAllCategory() {
        Query r=em.createNamedQuery("CategoryFoods.findAll");
        return r.getResultList();
    }

}
